<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *
    {
        margin: 0;
        padding: 0;
        /* 内减模式 */
        box-sizing: border-box;
    }
    body
    {
        background-color: #f3f5f7;
    }
    /* 版心 */
    .wrapper
    {
        width: 1200px;
        margin: 0 auto;
    }
    /* 清除浮动 */
    .clearfix::before,.clearfix::after
    {
        content: "";
        display: table;
    }
    .clearfix::after
    {
        clear: both;
    }
    /* 去除li前面的小点 */
    li
    {
        list-style: none;
    }
    /* 去除链接的下划线 */
    a
    {
        text-decoration: none;
    }

    /* 菜品信息 */
    .window{
        float: left;
        margin: 40px 10% 0px 10%;
        width: 80%;
        background-color: #fff;
    }

    .headline{
        
        float: left;
        margin-bottom: 20px;
        padding: 18px 0 40px 40px;
        width: 100%;
        height: 50px;
        background-color: #fff;
        box-shadow: 0px 2px 3px 0px rgba(118, 118,118,0.2);
        font: normal 500 25px 楷体;
    }

    .window table{
        
        width: 100%;
        text-align: center;
        border: 2px solid rgb(207,213,222);
    }

    .window tr{
        height: 60px;
        box-shadow: 0px 2px 3px 0px rgba(118, 118,118,0.1);
    }

    .window td{
        width: 120px;
    }
    
    .window .one{
        width: 60px;
    }

    .window .two{
        width: 200px;
    }

    .window img{
        cursor: pointer;
    }

    .window .add{
        float: right;
        margin: 50px 200px 0px 0px ;
    }

    button{
        float: right;
        margin: 40px 140px 0 0;
        width: 120px;
        height: 50px;
        background-color: rgb(0,110,255);
        color: #fff;
        border: none;
        cursor: pointer;
        border-radius: 5px;
    }
    </style>
</head>
<body>
    <!-- 窗口信息 -->
    <div class="headline"> 窗口菜品信息</div>
    <div class="window">
        <table class="clearfix">
            <thead>
                <tr>
                    <td class="one"></td>
                    <td>名称</td>
                    <td>id</td>
                    <td>价格</td>
                    <td>推荐人数</td>
                    <td>花费时长(min)</td>
                    <td>编辑</td>
                    <td>删除</td>
                </tr>
            </thead>
           <tbody>
               <tr th:each="dish:${dishes}">
                   <td class="one">
                       <img width="40px" height="40px" th:src="@{/{filename}(filename=${dish.getIcon()})}" />
                   </td>
                   <td th:text="${dish.getName()}"></td>
                   <td th:text="${dish.getId()}"></td>
                   <td class="two" th:text="${dish.getPrice()}" >10元</td>
                   <td th:text="${dish.getRecommendNum()}">120</td>
                   <td th:text="${dish.getFinishtime()}"></td>
                   <td class="two"><a th:href="@{/window/updatedish/(did = ${dish.getId()})}"><img th:src="${'/picture/编辑 1.png'}" alt=""></td>
                   <td><a th:href="@{/window/deldish/(did = ${dish.getId()})}"><img th:src="${'/picture/删除.png'}" alt=""></a></td>
               </tr>
           </tbody>
        </table>
        
    </div>
    <a th:href="@{/window/getadddishpage/(bid=${bid})}"><button class="add">添加菜品</button></a>
</body>
</html>